﻿@model wychuan2.com.Areas.admin.Models.LiCai.LiCaiModel
@{
    ViewBag.Title = "P2P理财";
    Layout = "../Shared/_Layout.cshtml";
}

@{
}

@section styles{
    <link href="~/Content/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="~/Content/plugins/datapicker/datepicker3.css" rel="stylesheet" />
}
<div class="row">
    <div class="col-lg-12">
        <div class="wrapper wrapper-content animated fadeInUp">

            <div class="ibox">
                <div class="ibox-title">
                    <h5>所有项目</h5>
                    <div class="ibox-tools">
                        <a href="#modalP2pProject" data-toggle="modal" class="btn btn-primary btn-xs">新建理财项目</a>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="row m-b-sm m-t-sm">
                        <div class="col-md-12">
                            <div class="input-group">
                                <input type="text" placeholder="请输入项目名称" class="input-sm form-control"> 
                                <span class="input-group-btn">
                                    <button type="button" class="btn btn-sm btn-primary"> 搜索</button>
                                </span>
                            </div>
                        </div>
                    </div>
                    <div class="row" id="tblContainer">
                        @Html.Partial("_P2PList",Model)
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>

<div id="modalP2pProject" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="lblCategory">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="lblCategory">添加理财项目</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal">
                    <input type="hidden" name="Id" value="0" />
                    <div class="form-group">
                        <label class="control-label col-sm-2">买入金额</label>
                        <div class="col-sm-10">
                            <div class="input-group">
                                <span class="input-group-addon">¥</span>
                                <input type="text" name="txtPrice" class="form-control input-sm" placeholder="买入金额" />
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-sm-2">购买账户</label>
                        <div class="col-sm-10">
                            <select class="form-control input-sm" name="selAccount">
                                @foreach (var account in Model.Accounts)
                                {
                                    <option value="@account.Id">@account.Name</option>
                                }
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-sm-2">购买日期</label>
                        <div class="col-sm-10">
                            <input type="text" name="txtBuyDay" class="form-control input-sm datetimepicker" value="@DateTime.Now.ToString("yyyy-MM-dd")" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-sm-2">购买周期</label>
                        <div class="col-sm-10">
                            <div class="input-group">
                                <input type="text" name="txtTimes" class="form-control input-sm text-right" placeholder="输入周期" />
                                <div class="input-group-btn" style="width:auto;">
                                    <select name="selTimeUnit" class="form-control input-sm">
                                        <option>天</option>
                                        <option>月</option>
                                        <option>年</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-sm-2">到期时间</label>
                        <div class="col-sm-10">
                            <input type="text" name="txtExpireDay" class="form-control input-sm datetimepicker" placeholder="到期时间" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-sm-2">年息率</label>
                        <div class="col-sm-10">
                            <div class="input-group">
                                <input type="text" name="txtInterestRate" class="form-control input-sm text-right" placeholder="输入年息率">
                                <span class="input-group-addon input-sm">%</span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">项目描述</label>
                        <div class="col-sm-10">
                            <input type="text" name="txtProject" class="form-control" placeholder="输入项目描述" />
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" id="btnSave" class="btn btn-primary">保存项目</button>
            </div>
        </div>
    </div>
</div>

@section scripts{
    <script src="~/Scripts/plugins/datapicker/bootstrap-datepicker.js"></script>
    <script src="~/Scripts/licai/p2p.js"></script>
}